package edu.sctu.zhengsenwen.month201506.day20150619.Nestdemo;

/**
 * Created by user15 on 2015/6/19.
 */
public class Nest1 {

    public int i1 = 10;

    public Nest1(){

        i1 += (new Nest2()).i2;
    }

    //在Nest1内创建Nest2，Nest2只能被类Nest1访问
        class Nest2{

            int i2 = 20;

            Nest2(){

                i2 += (new Nest3()).i3;
            }
        //在Nest1内创建Nest3，Nest3只能被类Nest3访问
            class Nest3{

                int i3 = 30;
            }
        }


}
